<template>
  <div class="user">
   <dh-form mode="formParams" :inline="true" label-position="left" :rules="rules" :formConfig="formConfig" :formParams="formParams" class="aaaa"/>
  </div>
</template>

<script lang="ts">
import Vue from 'vue'
import DhForm from '@/components/dh-components/dh-form/index.vue'

export default Vue.extend({
  components: {
    DhForm
  },
  name: 'UserIndex',
  data: function () {
    return {
      formParams: {
        name: 'xxxxxx',
        url: '',
        categoryId: 'aaa'
      },
      rules: {
        name: [
          { required: true, message: '请输入活动名称', trigger: 'blur' },
          { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
        ]

      },
      formConfig: [{
        name: 'name',
        label: '资源名称：'
      },
      {
        name: 'url',
        label: '资源路径：'
      },
      {
        name: 'categoryId',
        label: '资源分类：',
        htmlType: 'select',
        options: []
      }
      ]

    }
  }
})
</script>

<style lang="scss" scoped></style>
